package cpgears 
{
	import asunit.framework.TestCase;
	
	/**
	 * ...
	 * @author ...
	 */
	public class InteractiveWidgetTest extends TestCase
	{
		private var mInteractiveWidget:InteractiveWidget = null;
		private var mInteractiveMovie:InterfactiveMovie = null;
		
		
		public function InteractiveWidgetTest(testMethod:String = null) 
		{
			super(testMethod);
		}
		
		override protected function setUp():void 
		{
			mInteractiveWidget = new InteractiveWidget();
			mInteractiveMovie = new InterfactiveMovie();
			mInteractiveWidget.interactiveWidget_mc = mInteractiveMovie;
		}
		
		public function testSetSuccess():void 
		{
			mInteractiveWidget.setSuccess();
			assertTrue(mInteractiveMovie.success);
		}
		
		public function testSetFailure():void {
			mInteractiveWidget.setSuccess();
			mInteractiveWidget.setFailure();
			assertFalse(mInteractiveMovie.success);
		}
		
		public function testShowHint():void 
		{
			mInteractiveWidget.showHint();
			assertTrue(mInteractiveMovie.hint);
		}
		
		public function testHideHint():void 
		{
			mInteractiveWidget.showHint();
			mInteractiveWidget.hideHint();
			assertFalse(mInteractiveMovie.hint);
		}
	}

}
import flash.display.MovieClip;

class InterfactiveMovie extends MovieClip {
	
	public var success:Boolean = false;
	public var hint:Boolean = false;
	
	
	public function InteractiveMovie():void {
		
	}
	
	public function setSuccess(success:Boolean):void {
		this.success = success;
	}
	
	public function setShowHint():void {
		hint = true;
	}
	
	public function setHideHint():void {
		hint = false;
	}
}